<div class=" programme album-create">

    <div class="head_title">
        <span class="center-news" ui-sref="main.album">专辑管理</span>
        <span class="center-news" ui-sref="main.album.info({album:$state.params.albumId})">/专辑节目管理</span>
        <span class="news">/节目编辑</span>
    </div>

    <form class="form-horizontal wp-20 content-margin  w5c-form" name="albumForm" novalidate w5c-form-validate>
        <div class="form-group personal-second"style="padding-top: 40px">
            <label class="col-sm-3 control-label">

            </label>
            <div ng-if="formData.reviewStatus==9" style="color: red; margin: 0 0 20px -80px;">{{table[formData.reviewStatus]}}（ {{table[formData.reviewErrorId]}}<span ng-if="formData.reviewErrorMemo">{{formData.reviewErrorMemo}}</span>）</div>
            <div ng-if="formData.reviewStatus==8" style="color: #7bba91!important; margin: 0 0 20px -80px;">{{table[formData.reviewStatus]}}</div>
            <div ng-if="formData.reviewStatus==7" style="color: #f1d64b; margin: 0 0 20px -80px;">{{table[formData.reviewStatus]}}</div>
        </div>
        <section class="fg-section" style="border-top: none;">
            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>节目封面：</label>
                <div class="col-sm-7 personal-head">
                            <span class="programCover_a">
                                <img width="100%" height="100%" src="{{formData.programCover}}">
                            </span>
                    <label>
                        <span class="mask-span" style="left: 15px" >上传封面</span>
                        <input type="file" style="display: none" id="fileInput" >
                    </label>
                    <span style="color: red;position: absolute;left: 124px;top: 76px;font-size: 12px">{{errorImg}}</span>
                </div>
            </div>
            <div style="color: #d5d5d5;font-size: 12px;top:-10px;left: 220px;position: relative" >（图片大小不超过1M，支持PNG/JPG/JPEG格式）</div>

            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>选择专辑：</label>
                <div class="col-sm-7 personal-head">

                    <ui-select ng-model="album.albumSelected" theme="bootstrap" ng-change="albumChange(album.albumSelected)"
                               style="width: 300px;float: left">
                        <ui-select-match placeholder="请选择专辑">{{$select.selected.albumName}}</ui-select-match>

                        <ui-select-choices repeat="item in albumList | filter: $select.search">
                            <span ng-bind-html="item.albumName | highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>节目名称：</label>
                <div class="col-sm-7 personal-head">
                    <input type="text" class="input" placeholder="节目名称" ng-model="formData.programName"
                           name="programmeName" required>
                </div>
            </div>



            <div class="form-group personal-three tag  form_tag" ng-show="album.albumSelected.albumId">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>通用标签：</label>
                <div class="col-sm-7 personal-head personal-head_a" >
                    <ui-select ng-model="album.commonTagsSelected" multiple theme="bootstrap" close-on-select="false" remove-selected="false" >
                        <ui-select-match placeholder="最多选择5个标签">{{$item.commtagName}}</ui-select-match>

                        <ui-select-choices repeat="tag in commonTags | filter: { commtagName: $select.search }" group-by="commGroupFn">
                            <span ng-bind-html="tag.commtagName | highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                    <input type="number"  ng-model="album.commonTagsSelected.length" hidden name="channelSelected" max="5" min="1">


                </div>
            </div>
            <div class="form-group personal-three tag form_tag" ng-show="album.albumSelected.albumId">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>专用标签：</label>
                <div class="col-sm-7 personal-head personal-head_a" >
                    <ui-select ng-model="album.specialTagsSelected" multiple theme="bootstrap" close-on-select="false" remove-selected="false" style="width: 100%" >
                        <ui-select-match placeholder="最多选择5个标签">{{$item.specialName}}</ui-select-match>

                        <ui-select-choices repeat="tag in specialTags | filter: { specialName: $select.search }" group-by="specialGroupFn">
                            <span ng-bind-html="tag.specialName | highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                    <input type="number"  ng-model="album.specialTagsSelected.length" hidden name="speChannelSelected" max="5" min="1">

                </div>
            </div>
            <div class="form-group personal-second">
                <label class="col-sm-3 control-label">关键词：</label>
                <div class="col-sm-7 personal-head">
                    <input type="text" class="input" placeholder="多个关键词之间，用逗号或分号或顿号做区隔" ng-model="formData.keyword"
                           w5c-customizer="BaseValidations.checkKeyword(formData.keyword)" name="keyword">
                </div>
            </div>

            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>主播：</label>
                <div class="col-sm-7 personal-head">
                    <input type="text" class="input" placeholder="多个主播之间，用逗号或分号或顿号做区隔" ng-model="formData.anchorName"
                           name="anchorName"  w5c-customizer="BaseValidations.checkAnchorName(formData.anchorName)">
                </div>
            </div>

            <div class="form-group personal-second">
                <label class="col-sm-3 control-label">原创：</label>
                <div class="col-sm-7 personal-head">
                    <input type="text" class="input" placeholder="多个原创之间，用逗号或分号或顿号做区隔" ng-model="formData.originalName" name="originalName" w5c-customizer="BaseValidations.checkKeywordA(formData.originalName)">
                </div>
            </div>

            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>节目简介：</label>
                <div class="col-sm-7 personal-head">
                    <textarea class="form-control" rows="5" required ng-model="formData.summary" name="summary" ng-minlength="10" ng-maxlength="1000"></textarea>
                </div>
            </div>

            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>重传音频：</label>
                <div class="col-sm-7 personal-head" style="padding-top: 5px">
                    <label type="button" class="btn btn-default btn-sm" style="width: 100px;color: #fff">
                        上传音频
                        <input type="file" nv-file-select id="audioFile" uploader="uploaderAudio"
                               style="display: none" multiple>
                    </label>
                    <span style="color: #CCCCCC">（仅可上传一个音频，大小范围0.5-150M，支持MP3、AAC格式）</span>
                    <div style="font-size: 12px" ng-if="image_a==true"  class="emailError">
                        {{imageMsg}}
                    </div>
                    <table class="table table-bordered table-hover" style="margin-top: 10px"
                           ng-show="uploaderAudio.queue.length">
                        <thead>
                        <tr>
                            <th>音频名称</th>
                            <th>大小</th>
                            <th>进度</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in uploaderAudio.queue" ng-class="{'red':item.isSuccess=='uploadFail'}">
                            <td><span ng-show="item.isSuccess=='uploadFail'">(上传失败)</span><span class="first-td">{{item.file.name}}</span></td>
                            <td>{{ item.file.size/1024/1024|number:2 }} MB</td>
                            <td>
                                <uib-progressbar value="item.progress">{{item.progress}}%</uib-progressbar>
                            </td>
                            <td>
                                <i class="fa fa-trash" aria-hidden="true" style="color: red"
                                   ng-click="item.remove();removeFile($index)"></i>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <label type="button" class="btn btn-primary btn-sm" ng-click="uploadAllAudio()" style="margin-top: 20px"
                           ng-show="uploaderAudio.queue.length">
                        上传
                    </label>

                </div>
            </div>

            <div class="text-center">

                <button type="button" class="btn btn-primary" w5c-form-submit="programmeEdit()" ng-if="uploaderAudio.queue.length==list.length"
                        ng-disabled="disabled">确定
                </button>

                <button class="btn btn-primary" type="button" ng-show="uploaderAudio.queue.length!=list.length">{{'等待上传完成'}}</button>
                <button type="button" class="btn ims-btn" ui-sref="main.album.info({album:$state.params.albumId})" ui-sref-opts="{reload:true}">取消</button>
            </div>

        </section>


    </form>


</div>
